<?php

/**
 * @filesource Contact class.
 *
 * @copyright 2011 by Dan, Steven, Brice, Mike, and Aaron.  This program is part
 * of Internship 2 Career, which is free software. It comes with absolutely no
 * warranty. You can redistribute or modify it under the terms of the GNU
 * General Public License as published by the Free Software Foundation (For
 * more information, see <http://www.gnu.org/licenses/).
 *
 * @version March 4, 2011
 *
 * @author Daniel Pepin
 */
class Contact {

    //these private variables are only accessible in this class,
    //we have to use functions or other methods to use them
    private $contactID;
    private $organizationID;
    private $fname;
    private $lname;
    private $email;
    private $phone;
    private $ext;
    private $fax;

    function __construct($organizationID, $fname, $lname, $email, $phone, $ext,
            $fax) {
        $this->contactID = null;
        $this->organizationID = $organizationID;
        $this->fname = $fname;
        $this->lname = $lname;
        $this->email = $email;
        $this->phone = $phone;
        $this->ext = $ext;
        $this->fax = $fax;
    }

    function setContactID($contactID) {
        $this->contactID = $contactID;
    }

    function setOrganizationID($organizationID) {
        $this->organizationID = $organizationID;
    }

    function setLName($lname) {
        $this->lname = $lname;
    }

    function setFName($fname) {
        $this->fname = $fname;
    }

    function setEmail($email) {
        $this->email = $email;
    }

    function setPhone($phone) {
        $this->phone = $phone;
    }

    function setFax($fax) {
        $this->fax = $fax;
    }

    function setExt($ext) {
        $this->ext = $ext;
    }

    function getContactID() {
        return $this->contactID;
    }

    function getOrganizationID() {
        return $this->organizationID;
    }

    function getFname() {
        return $this->fname;
    }

    function getLname() {
        return $this->lname;
    }

    function getEmail() {
        return $this->email;
    }

    function getPhone() {
        return $this->phone;
    }

    function getExt() {
        return $this->ext;
    }

    function getFax() {
        return $this->fax;
    }

    function printAllAttributes() {
        $output = sprintf("Organization ID: %d, fname: %s, lname %s, eamil %s,
            phone: %s, ext:  %s, fax: %s.",
                        $this->organizationID, $this->fname, $this->lname,
                        $this->email, $this->phone, $this->ext, $this->fax);
        return $output;
    }

}

?>